﻿#include "BaseNode.h"
#include "BaseNodeGraphicsItem.h"
BaseNode::BaseNode() : DA::DAAbstractNode()
{
}

BaseNode::~BaseNode()
{
}

bool BaseNode::exec()
{
    return true;
}

void BaseNode::setDisplayName(const QString& name)
{
    setProperty("display-name", name);
    auto gi = graphicsItem();
    if (gi) {
        if (auto basegi = dynamic_cast< BaseNodeGraphicsItem* >(gi)) {
            basegi->nodeDisplayNameChanged(name);
        }
    }
}

QString BaseNode::getDisplayName() const
{
    return getProperty("display-name").toString();
}
